package com.ibeeking.found.common.db.util;

import com.baomidou.dynamic.datasource.toolkit.CryptoUtils;

public class DBPasswordGenerateUtil {

    public static void main(String[] args) throws Exception {
        String password = "Ibeeking0728";
        String encUser = "EQVAOpKFvAhaB3ptIPLLa7lkTHSJ5BZwPA5OBgXLFxY13zr6R55nWnOestbnTFULFk2BhWrRUUgx8uLPJ0/D+Q==";
        String decodeuser = CryptoUtils.decrypt(encUser);
        String encodePassword = CryptoUtils.encrypt(password);
        System.out.println(encodePassword);
        String host = CryptoUtils.encrypt("139.196.12.105");
        //自定义publicKey
        String[] arr = CryptoUtils.genKeyPair(512);
        System.out.println("privateKey:" + arr[0]);
        System.out.println("publicKey:" + arr[1]);
        System.out.println("password:" + CryptoUtils.encrypt(arr[0], password));
        String decodePassword = CryptoUtils.decrypt(encodePassword);
    }
}
